<div class="wrapper">
	<p>horizontal and vertical</p>
</div>
<style>
	.wrapper {
		width: 300px;
		height: 300px;
		border: 1px solid #ccc;

		display: flex;
	}

	.wrapper>p {
		margin: auto;
	}
</style>